#ifndef __IGRAPHICS_HPP__
#define __IGRAPHICS_HPP__

#include <typeinfo>
#include <RevEng/RevEng.hpp>

#include "IIndexBuffer.hpp"	
#include "IVertexBuffer.hpp"
#include "Material.hpp"
#include "Light.hpp"

#define RE_POINT_LIST		0x000E0001
#define RE_LINE_LIST		0x000E0002
#define RE_LINE_LOOP		0x000E0003
#define RE_TRIANGLE_LIST	0x000E0004
#define RE_TRIANGLE_STRIP	0x000E0005
#define RE_TRIANGLE_FAN		0x000E0006

#define RE_WORLD			0x000F0001
#define RE_VIEW				0x000F0002
#define RE_PROJECTION		0x000F0003

namespace Graphics 
{
	class IGraphics
	{
	private:
		static IGraphics*s_pInstance;

	public:
		static IGraphics* Instance();
		static void Delete();

	public:
		virtual ~IGraphics() = 0;
		
		virtual void BeginFrame(const RevEng::Math::Vector4s &Color) = 0;
		virtual void EndFrame() = 0;
		
		virtual void SetViewport(const RevEng::Math::Rectui &Area) = 0;
		virtual void SetTransform(RevEng::Enum TransType, const RevEng::Math::Matrix4s &In) = 0;
		virtual void SetLight(RevEng::UInt32 Index, const Light& Lgt) = 0;
		virtual void SetMaterial(const Material& Mat) = 0;
		virtual void SetVertices(IVertexBuffer* Buffer) = 0;
		virtual void SetIndices(IIndexBuffer* Buffer) = 0;

		virtual void Render(RevEng::Enum Primitive/*, RevEng::UInt32 Count*/) = 0;

		virtual bool DoEvents() = 0;
	};


	inline IGraphics::~IGraphics()
	{
	}
}
#endif	//__IGRAPHICS_HPP__
